//
//  DeleteViewController.m
//  AlinkDemo
//
//  Created by yougou-sk on 2017/11/3.
//  Copyright © 2017年 aliyun. All rights reserved.
//

#import "DeleteViewController.h"

@interface DeleteViewController ()

@property (weak, nonatomic) IBOutlet UIButton *button;
@end

@implementation DeleteViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    self.view.backgroundColor = [UIColor colorWithWhite:1 alpha:0.9];
    self.confirmButton.layer.cornerRadius =5.0;
    self.cancelButton.layer.cornerRadius =5.0;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



- (IBAction)buttonClick:(UIButton *)sender {
    if (sender.tag==0) {
        if (self.conformBlock) {
            self.conformBlock(sender.selected);
            [self.mz_formSheetPresentingPresentationController dismissViewControllerAnimated:YES completion:nil];
            
        }
    }else if (sender.tag==3) {
        
        sender.selected = !sender.selected;
    }else{
        
        if (self.cancelBlock) {
            self.cancelBlock();

        }
        
        [self.mz_formSheetPresentingPresentationController dismissViewControllerAnimated:YES completion:nil];
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
